public class Example4_3{
public static void main(String[] args){
	//先声明
	int[] hobbies;
	hobbies=new int[3];
	hobbies[0]=1;
	hobbies[2]=2;
	System.out.println(hobbies[0]);//输出第一个数
	System.out.println(hobbies.length);
	}
}
